//
//  JMMacros.h
//  Pods
//  常用宏
//  Created by Zhuangyh on 16/1/22.
//
//
#import "SingletionMacros.h"

#ifndef JMMacros_h
#define JMMacros_h

#define TranType_OrNil(type,obj) ([obj isKindOfClass:[type class]]? ((type*)obj):nil)

#define WF(weakSelf) __weak __typeof(self) weakSelf= self

//iphone6坐标系下的坐标。（会根据屏幕自动缩放倍数计算）
#define IPHONE6_SIZE(X)  ([UIScreen mainScreen].bounds.size.width/(750.0/2.0))*X

//获取ios版本第二种方法 (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1)
#define iOS8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
#define iOS7_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)

#endif /* JMMacros_h */
